﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="lottery.aspx.cs" Inherits="_70C.activitys.lottery" %>



 <!DOCTYPE html>
<!--[if IE 6 ]> <html class="ie ie6 ie7 ie8"> <![endif]-->
<!--[if IE 7 ]> <html class="ie ie7 ie8"> <![endif]-->
<!--[if IE 8 ]> <html class="ie ie8"> <![endif]-->
<!--[if IE 9 ]> <html class="ie ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html> <!--<![endif]-->
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta property='og:locale' content='zh_CN'/>
<meta property='og:type' content='article'/>
<meta name="format-detection" content="telephone=no" />
<meta name="apple-touch-fullscreen" content="YES" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<link href="http://res.70c.com/activitys/res/store/style/global.css?&versin=55" rel="stylesheet" type="text/css" />
<link href="http://res.70c.com/activitys/res/store/style/global_t.css?&versin=55" rel="stylesheet" type="text/css" />
<link href="http://res.70c.com/lib/vendor/jquery.datetimepicker.min.css?&versin=55" rel="stylesheet" type="text/css" />
<title>70c抽奖活动</title>
<!--[if lte IE 6]>
		<script src="http://res.70c.com/activitys/res/store/script/DD_belatedPNG_0.0.8a-min.js" type="text/javascript"></script>
		<script type="text/javascript">
			DD_belatedPNG.fix('*');
		</script>
	<![endif]-->
<!--[if lte IE 9]>8
		<script type="text/javascript" src="http://res.70c.com/activitys/res/store/script/html5.js?&versin=55"></script>
	<![endif]-->
</head>
<body class='s-bg-eee'>

<section class="g-container">

<link href="http://res.70c.com/activitys/res/admin/bootstrap.css" rel="stylesheet">
<link href="http://res.70c.com/activitys/res/admin/common.css" rel="stylesheet">
<link href="http://res.70c.com/activitys/css/admin/dialog.css" rel="stylesheet" type="text/css">
<link href="http://res.70c.com/activitys/res/lottery/admin/css/page.css?v=1413792014" rel="stylesheet">
<script src="http://res.70c.com/activitys/js/admin/swfupload/swfupload.js"></script>
<script src="http://res.70c.com/activitys/js/admin/handlers.js"></script>
<script src="http://res.70c.com/activitys/js/jquery-1.7.2.min.js"></script>
<script src="http://res.70c.com/lib/vendor/jquery.datetimepicker.min.js"></script>
<script src='http://res.70c.com/activitys/js/admin/common/kindeditor/kindeditor-min.js'></script>
<script src='http://res.70c.com/activitys/js/admin/common/kindeditor/lang/zh_CN.js'></script>
<script src='http://res.70c.com/activitys/js/admin/common/kindeditor/plugins/code/prettify.js'></script>
<script type="text/javascript" src="http://res.70c.com/activitys/js/admin/common/zclip/jquery.zclip.min.js"></script>
<script src="http://res.70c.com/activitys/js/admin/dialog.js"></script>
<script src="http://res.70c.com/activitys/res/lottery/admin/js/page.js?v=1422444430"></script>
<script src="http://res.70c.com/activitys/res/lottery/admin/js/shake.js"></script>


<style>
.page-title-text {
  width: auto;
}
.submit-text {
    padding: 10px;
}
.submit-url {
   width: 70%;
   margin-left: 10px;
 }
 
 .lottery-mod {
     margin-bottom: 10px;
 }
 .lottery-mod h6 {
padding-left: 10px;
margin-bottom: 10px;
line-height: 2em;
font-size: 16px;
font-weight: bold;
   border-left: 3px solid #43920d;
 }
 .dcon_from {
float: right;
width: 200px;
}
.span56 {
width: 220px;
}
.span6 {
width: 290px;
}
.span8 {
width: 400px;
}
li {list-style-type:none;}
</style>


<form id="CardForm" class="form-horizontal">
<div class="g-ct f-widthC">
<section class="m-myShop aty_y" style="overflow:hidden;">

<div class="f_r_aty" style="float: none;">

<div class="shop-ct m-goodS">
<h5><span class="page-title-text">摇一摇抽奖设置</span></h5>
</div>
      

<div class="content-wrapper">
    <div id="prevDiv">
        <div>
        
            <div class="y_step4_r">
            <div style="">
            <h6>编辑标题</h6>
             <input type="hidden" id="countprice" name="countprice">
             <input type="hidden" id="SceneID" name="SceneID" value="1368826">
            <input type="text" name="aty[title]" placeholder="摇一摇标题(12字以内)"   value="摇一摇标题" style="width:95%;" maxlength="12">
            <h6 style="margin-top:20px;">编辑活动说明（80字以内）</h6>
            <textarea name="aty[content]" placeholder="摇一摇描述(80字以内)"  style="width:95%;height:140px;" id="aty[content]" maxlength="80">摇一摇描述</textarea>
            <input type="hidden" id="text-limit" value="0">
            </div>
            </div>
        
        </div>
          <div>
            <div class="y_step3_r">
            <p class="step3-desc">5张签条的抽奖概率的和是100%(保留两位小数)</p>
            <ul class="u_pad">
            <li prize-item>
            <h5 style="height:30px;line-height:30px;font-size:16px;"><span>上上签</span><i class="icon-edit" edit-prize-title></i></h5>
            <input type="hidden" name="prize[1][title]" value="上上签">
            <i class="icon-plus data-info-toggle" style="margin-left:530px;float:right;margin-top:-35px;"></i>
            <div class="data-extend z-hide">
            <div class="award-tag">
            <p class="dic_bg " placeholder="请输入签条文字"><span data-text>一等奖</span></p>
            </div>
            <div class="dcon_from">
            <div class="f_form">
            <ul class="de_sed">
            <li style="height:42px;">
            <label>奖品名称</label>
            <input type="text" title="12字以内" name="prize[1][name]" value="一等奖" prize-name maxlength="12">
            </li>
            <li style="height:42px;">
            <label>中奖概率</label>
            <input type="text" name="prize[1][chance]" value="10" data-chance>
            <span> %</span>
            </li>
            <li style="height:42px;">
            <label>奖品数量</label>
            <input type="number" min="0" name="prize[1][count]" value="5" placeholder="不填默认奖品数量无上限"> 件
            </li>
              <li style="height:32px;">
            <input type="checkbox" name="prize[1][use_form]" checked>
            <span class="step3-desc">是否需要联系中奖者派发奖品</span>
            </li>
            <li style="height:82px;">
            <label>抽中后提示文案(10字以内)</label>
            <textarea name="prize[1][win_hint]" style="width:175px;" maxlength="10">恭喜抽中一等奖</textarea>
            </li>
            </ul>
            </div>
            <div  prize-upload-id="1">
            <h5 class="step3-desc">奖品图片支持jpg/png格式，尺寸350*300，不超过50K</h5>
            <img src="http://res.70c.com/activitys/res/lottery/admin/images/prize1.jpg" style="width:100px;height:100px;">
            <input type="hidden" name="prize[1][pic]" value="activitys/res/lottery/admin/images/prize1.jpg">
            </div>
            </div>
            </div>
            </li>
            <li prize-item>
            <h5 style="height:30px;line-height:30px;font-size:16px;"><span>上吉签</span><i class="icon-edit" edit-prize-title></i></h5>
            <input type="hidden" name="prize[2][title]" value="上吉签">
            <i class="icon-plus data-info-toggle " style="margin-left:530px;float:right;margin-top:-35px;"></i>
            <div class="data-extend z-hide">
            <div class="award-tag">
            <p class="dic_bg " placeholder="请输入签条文字"><span data-text>二等奖</span></p>
            </div>
            <div class="dcon_from">
            <div class="f_form">
            <ul class="de_sed">
            <li style="height:42px;">
            <label>奖品名称</label>
            <input type="text" name="prize[2][name]" value="二等奖" prize-name maxlength="12">
            </li>
            <li style="height:42px;">
            <label>中奖概率</label>
            <input type="text" name="prize[2][chance]" value="20" data-chance>
            <span>%</span>
            </li>
            <li style="height:42px;">
            <label>奖品数量</label>
            <input type="number" min="0" name="prize[2][count]" value="10" placeholder="不填默认奖品数量无上限">件
            </li>
           <li style="height:32px;">
            <input type="checkbox" name="prize[2][use_form]" checked>
            <span class="step3-desc">是否需要联系中奖者派发奖品</span>
            </li>
            <li style="height:82px;">
            <label>抽中后提示文案(10字以内)</label>
            <textarea name="prize[2][win_hint]" style="width:175px;" maxlength="10">恭喜抽中二等奖</textarea>
            </li>
            </ul>
            </div>
            <div  prize-upload-id="2">
            <h5 class="step3-desc">奖品图片支持jpg/png格式，尺寸350*300，不超过50K!</h5>
            <img src="http://res.70c.com/activitys/res/lottery/admin/images/prize2.jpg" style="width:100px;height:100px;">
            <input type="hidden" name="prize[2][pic]" value="activitys/res/lottery/admin/images/prize2.jpg">
            </div>
            </div>
            </div>
            </li>
            <li prize-item>
            <h5 style="height:30px;line-height:30px;font-size:16px;"><span>中吉签</span><i class="icon-edit" edit-prize-title></i></h5>
            <input type="hidden" name="prize[3][title]" value="中吉签">
            <i class="icon-plus data-info-toggle " style="margin-left:530px;float:right;margin-top:-35px;"></i>
            <div class="data-extend z-hide">
            <div class="award-tag">
            <p class="dic_bg " placeholder="请输入签条文字"><span data-text>三等奖</span></p>
            </div>
            <div class="dcon_from">
            <div class="f_form">
            <ul class="de_sed">
            <li style="height:42px;">
            <label>奖品名称</label>
            <input type="text" name="prize[3][name]" value="三等奖" prize-name maxlength="12">
            </li>
            <li style="height:42px;">
            <label>中奖概率</label>
            <input type="text" name="prize[3][chance]" value="20" data-chance>
            <span>%</span>
            </li>
            <li style="height:42px;">
            <label>奖品数量</label>
            <input type="number" min="0" name="prize[3][count]" value="50" placeholder="不填默认奖品数量无上限">件
            </li>
              <li style="height:32px;">
            <input type="checkbox" name="prize[3][use_form]" checked>
            <span class="step3-desc">是否需要联系中奖者派发奖品</span>
            </li>
            <li style="height:82px;">
            <label>抽中后提示文案(10字以内)</label>
            <textarea name="prize[3][win_hint]" style="width:175px;" maxlength="10">恭喜抽中三等奖</textarea>
            </li>
            </ul>
            </div>
            <div  prize-upload-id="3">
            <h5 class="step3-desc">奖品图片支持jpg/png格式，尺寸350*300，不超过50K</h5>
            <img src="http://res.70c.com/activitys/res/lottery/admin/images/prize3.jpg" style="width:100px;height:100px;">
            <input type="hidden" name="prize[3][pic]" value="activitys/res/lottery/admin/images/prize3.jpg">
            </div>
            </div>
            </div>
            </li>
            <li prize-item>
            <h5 style="height:30px;line-height:30px;font-size:16px;"><span>中平签</span><i class="icon-edit" edit-prize-title></i></h5>
            <input type="hidden" name="prize[4][title]" value="中平签">
            <i class="icon-plus data-info-toggle " style="margin-left:530px;float:right;margin-top:-35px;"></i>
            <div class="data-extend z-hide">
            <div class="award-tag">
            <p class="dic_bg " placeholder="请输入签条文字"><span data-text>四等奖</span></p>
            </div>
            <div class="dcon_from">
            <div class="f_form">
            <ul class="de_sed">
            <li style="height:42px;">
            <label>奖品名称</label>
            <input type="text" name="prize[4][name]" value="四等奖" prize-name maxlength="12">
            </li>
            <li style="height:42px;">
            <label>中奖概率</label>
            <input type="text" name="prize[4][chance]" value="20" data-chance>
            <span>%</span>
            </li>
              <li style="height:32px;">
            <input type="checkbox" name="prize[4][use_form]" checked>
            <span class="step3-desc">是否需要联系中奖者派发奖品</span>
            </li>
            <li style="height:50px;">
            <label>奖品数量</label>
            <input type="number" min="0" name="prize[4][count]" value="80" placeholder="不填默认奖品数量无上限">件
            </li>
            <li style="height:82px;">
            <label>抽中后提示文案(10字以内)</label>
            <textarea name="prize[4][win_hint]" style="width:175px;" maxlength="10">恭喜抽中四等奖</textarea>
            </li>
            </ul>
            </div>
            <div  prize-upload-id="4">
            <h5 class="step3-desc">奖品图片支持jpg/png格式，尺寸350*300，不超过50K</h5>
            <img src="http://res.70c.com/activitys/res/lottery/admin/images/prize4.jpg" style="width:100px;height:100px;">
            <input type="hidden" name="prize[4][pic]" value="activitys/res/lottery/admin/images/prize4.jpg">
            </div>
            </div>
            </div>
            </li>
            <li prize-item>
            <h5 style="height:30px;line-height:30px;font-size:16px;"><span>下下签</span><i class="icon-edit" edit-prize-title></i></h5>
            <input type="hidden" name="prize[5][title]" style="width:100px;" value="下下签">
            <i class="icon-plus data-info-toggle " style="margin-left:530px;float:right;margin-top:-35px;"></i>
            <div class="data-extend z-hide">
            <div class="award-tag">
            <p class="dic_bg " placeholder="请输入签条文字"><span data-text>谢谢参与</span></p>
            </div>
            <div class="dcon_from">
            <div class="f_form">
            <ul class="de_sed">
            <li style="height:42px;">
            <label>奖品名称</label>
            <input type="text" name="prize[5][name]" value="谢谢参与" prize-name maxlength="12">
            </li>
            <li style="height:42px;">
            <label>中奖概率</label>
            <input type="text" name="prize[5][chance]" value="30" data-chance>
            <span>%</span>
            </li>
            <li style="height:42px;">
            <label>奖品数量</label>
            <input type="number" min="0" name="prize[5][count]" value="100" placeholder="不填默认奖品数量无上限">件
         
            </li>
             <li style="height:32px;">
            <input type="checkbox" name="prize[5][use_form]" >
            <span class="step3-desc">是否需要联系中奖者派发奖品</span>
            </li>
            <li style="height:82px;">
            <label>抽中后提示文案(10字以内)</label>
            <textarea name="prize[5][win_hint]" style="width:175px;" maxlength="10">谢谢参与</textarea>
            </li>
            </ul>
            </div>
            <div  prize-upload-id="5">
            <h5 class="step3-desc">奖品图片支持jpg/png格式，尺寸350*300，不超过50K</h5>
            <img src="http://res.70c.com/activitys/res/lottery/admin/images/prize0.jpg" style="width:100px;height:100px;">
            <input type="hidden" name="prize[5][pic]" value="activitys/res/lottery/admin/images/prize0.jpg">
            </div>
            </div>
            </div>
            </li>
            </ul>

            </div>
        
        </div>

        <div><span class="u-create-step-btn" go-step3 onclick="showNext();">下一步</span></div>
    </div>
    <div class="row lottery-mod" id="nextDiv"  style="display:none;">
        <div class="span6">
            <h5 class="u-create-step3-title">抽奖活动时间</h5>
            <div class="t_start"><label style="margin-left:15px;">开始时间</label>
            <input class="Wdate u-create-step3-time" name="aty[start_time]" type="text" value="2015-09-09 16:58:15" id="start-time" ></div>
            <div class="t_start">
            <label style="margin-left:15px;">结束时间</label>
            <input class="Wdate u-create-step3-time" name="aty[end_time]" type="text" value="2015-09-10 16:58:15"></div>
            <span class="step3-desc time-desc">* 时间截止后，活动将自动停止</span>
            <br />
            <li class="time-multple">
            <input type="checkbox" name="IsMore" checked>
            <span class="step3-desc">是否允许单个用户多次中奖</span>
            </li>
        </div>
          <div class="span6">
            <h5 class="u-create-step3-title">每个用户抽奖次数</h5>
            <div style="margin-bottom: 10px;">
            <label style="margin-left:15px;">总共可抽</label>
            <span class="u-create-step3-limit-ctl" style="margin-left:20px;" minus-limit="">-</span>
            <input type="number" min="0" name="aty[total_limit]" value="1" style="width:35px;height:18px;">
            <span class="u-create-step3-limit-ctl" add-limit="">+</span>        
            </div>  


            <div>
            <label style="margin-left:15px;">每日可抽</label>
            <span class="u-create-step3-limit-ctl" style="margin-left:20px;" minus-limit="">-</span>
            <input type="number" min="0" name="aty[day_limit]" value="1" style="width:35px;height:18px;">
            <span class="u-create-step3-limit-ctl" add-limit="">+</span>
            </div>
        </div>

        
    </div>


    <div class="row lottery-mod" id="nextDiv2" style=" display:none;">
        <div class="span12">
            <div>


                <div>
                    <h5 class="u-create-step3-title">用户抽奖后跳转链接</h5>
                    <div>
                        <div>
                            <p class="step3-desc" style="margin-left:15px;">用户在点击"提交领奖"按钮后,会自动跳转到以下网址</p>
                            <input type="text" name="aty[jump_link]" value="" title="例如: http://www.70c.com" style="margin-left:15px;width:95%;">
                        </div>
                    </div>
                    <div>
                        <span class="u-create-step-btn" onclick="showPrev();">上一步</span>
                            <span class="u-create-step-btn" onclick="Cancel();">取消</span>
                            <span class="u-create-step-btn" go-finish>完成</span>
                    </div>
                    <p style="margin-top: 10px;color: #d9534f;">设置完成后请到后台点击开启摇奖活动</p>
                </div>
            </div>
        </div>
    </div>

</div>
</div>
</section>
</div>
<span id="uploadData" style="display:none;" data-ssid="28sruj40r461da1v7t7f0gtn90"></span>
</form>
</section>




<script src="http://res.70c.com/activitys/js/app/welcome/validemail.js?&versin=55"></script>
<script src="http://res.70c.com/activitys/js/app/welcome/clocktime.js?&versin=55"></script> 
<!--[if (gte IE 6)&(lte IE 8)]>
		<script type="text/javascript" src="http://res.70c.com/activitys/res/store/script/selectivizr.js?&versin=55"></script>
	<![endif]-->
<script src="http://res.70c.com/activitys/res/store/script/global.js?&versin=55" type="text/javascript"></script>
<script>
    function enterLogin(e) {
        if (e.keyCode == 13) {
            sessionCtr.login();
        }
    }
    function Cancel() {
        parent._lotteryCancel();
    }
    function showNext() {
        if ($("input[name='aty[title]']").val() == "") {
            alert("请填写标题");
            $("input[name='aty[title]']").focus();
            return false;
        }
        var content = $("textarea[name='aty[content]']").val();
        if (content == "") {
            alert("请填写活动说明");
            $("textarea[name='aty[content]']").focus();
            return false;
        } else if ($("#text-limit").val() == "1") {
            alert("活动说明限制在80字以内");
            $("textarea[name='aty[content]']").focus();
            return false;
        }
        var length = $("li[prize-item]").length;
        var sumChance = 0;
        for (var i = 1; i < length + 1; ++i) {
            if ($("input[name='prize[" + i + "][name]']").val() == "") {
                alert("请填写第" + i + "个奖品名称");
                $("input[name='prize[" + i + "][name]']").focus();
                return false;
            }
            if ($("input[name='prize[" + i + "][chance]']").val() == "") {
                alert("请填写第" + i + "个奖品概率");
                $("input[name='prize[" + i + "][chance]']").focus();
                return false;
            }
            if ($("input[name='prize[" + i + "][count]']").val() != "") {
                var prtext = $("input[name='prize[" + i + "][count]']").val();
                if (!/^[0-9]\d*$/.test(prtext)) {
                    alert("第" + i + "个奖品数量必须为整数");
                    $("input[name='prize[" + i + "][count]']").focus();
                    return false;
                }
            } else {
                alert("第" + i + "个奖品数量必须为整数");
                $("input[name='prize[" + i + "][count]']").focus();
                return false;
            }
            if ($("textarea[name='prize[" + i + "][win_hint]']").val() == "") {
                alert("请填写第" + i + "个奖品抽中提示文案");
                $("textarea[name='prize[" + i + "][win_hint]']").focus();
                return false;
            }
            sumChance += parseFloat($("input[name='prize[" + i + "][chance]']").val());

        }
        if (sumChance != 100) {
            alert("抽奖概率的和是100%");
            return false;
        }
        document.getElementById("nextDiv").style.display = "block";
        document.getElementById("nextDiv2").style.display = "block";
        document.getElementById("prevDiv").style.display = "none";

        $("input[name='aty[end_time]']").datetimepicker({ format: 'Y-m-d H:i:s', className: 'datepicker-narrow' });
        $("input[name='aty[start_time]']").datetimepicker({ format: 'Y-m-d H:i:s', className: 'datepicker-narrow' });
    }
    function showPrev() {
        document.getElementById("prevDiv").style.display = "block";
        document.getElementById("nextDiv").style.display = "none";
        document.getElementById("nextDiv2").style.display = "none";
    }
    function comptime(beginTime, endTime) {
        var beginTimes = beginTime.substring(0, 10).split('-');
        var endTimes = endTime.substring(0, 10).split('-');

        beginTime = beginTimes[1] + '-' + beginTimes[2] + '-' + beginTimes[0] + ' ' + beginTime.substring(10, 19);
        endTime = endTimes[1] + '-' + endTimes[2] + '-' + endTimes[0] + ' ' + endTime.substring(10, 19);

        var a = (Date.parse(endTime) - Date.parse(beginTime)) / 3600 / 1000;
        if (a < 0) {
            return "1";
        } else if (a > 0) {
            return "2";
        } else if (a == 0) {
            return "3";
        } else {
            return 'exception'
        }
    }
    // 完成抽奖配置
    $("span[go-finish]").live("click", function () {
        $("#countprice").val($("li[prize-item]").length)
        if ($("input[name='aty[start_time]']").val() == "") {
            alert("请填写开始时间");
            $("aty[start_time]").focus();
            return false;
        }

        if ($("input[name='aty[end_time]']").val() == "") {
            alert("请填写结束时间");
            $("aty[end_time]").focus();
            return false;
        }
        var a = comptime($("input[name='aty[start_time]']").val(), $("input[name='aty[end_time]']").val());
        if (a == "1") {
            alert("开始时间不能大于结束时间");
            $("input[name='aty[start_time]']").focus();
            return false;
        }
        if (a == "3") {
            alert("开始时间不能等于结束时间");
            $("input[name='aty[start_time]']").focus();
            return false;
        }

        if ($("input[name='aty[total_limit]']").val() == "") {
            alert("请填写总共可抽次数");
            $("input[name='aty[total_limit]']").focus();
            return false;
        }
        else {
            if (!/^[0-9]\d*$/.test($("input[name='aty[total_limit]']").val())) {
                alert("总共可抽次数必须为整数");
                $("input[name='aty[total_limit]").focus();
                return false;
            }

        }

        if ($("input[name='aty[day_limit]']").val() == "") {
            alert("请填写每日可抽次数");
            $("input[name='aty[day_limit]']").focus();
            return false;
        }
        else {
            if (!/^[0-9]\d*$/.test($("input[name='aty[day_limit]']").val())) {
                alert("每日可抽次数必须为整数");
                $("input[name='aty[day_limit]").focus();
                return false;
            }

        }

        if (parseInt($("input[name='aty[day_limit]']").val()) > parseInt($("input[name='aty[total_limit]']").val())) {
            alert("请每日可抽次数不能大于总抽次数");
            $("input[name='aty[day_limit]']").focus();
            return false;
        }


        var jumpUrl = $("input[name='aty[jump_link]']").val();
        if (jumpUrl != "") {
            var urlReg = /http(s)?:\/\/([\da-z-\.]+)\.([a-z]{2,6})([\/\w \.-?&%-]*)*\/?/;
            if (!urlReg.test(jumpUrl)) {
                alert("跳转链接错误~！ 必须是有效的链接地址. \n例如: http://70c.com");
                $("input[name='aty[jump_link]']").focus();
                return false;
            }
        }

        $.ajax({
            cache: true,
            type: "POST",
            url: "/activitys/addactivity",
            data: $('#CardForm').serialize(), // 你的formid
            async: false,
            error: function (request) {
                alert("Connection error");
            },
            success: function (data) {
                if (data.result == "1") {
                    if (0 == 0) {
                        parent._lotteryConfirm();
                    }
                    else {
                        alert("操作成功！")
                    }

                } else {
                    alert(data.message)
                }
            }
        });

    });

	</script>
</body>
</html>

